Uploaded image for project: 'JaxMe'
  1. JaxMe
  2. JAXME-63

JaxMe (wrongly) accepts schema using <group ref="..." maxOccurs="unbounded"/>

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • current (nightly)
    • 0.5
    • JaxMe Core
    • None
    • JDK 1.5.0, JaxMe CVS

    Description

      JaxMe accepts (and generates faulty code for) the following schema:

      <xs:group name="params">
      <xs:choice>
      <xs:element name="string" type="xs:string"/>
      <xs:element name="int" type="xs:int"/>
      <xs:element name="boolean" type="xs:boolean"/>
      </xs:choice>
      </xs:group>

      <xs:element name="call">
      <xs:complexType>
      <xs:group ref="params" maxOccurs="unbounded"/>
      </xs:complexType>
      </xs:element>

      However, it should give an error message about not supporting model groups with maxOccurs > 1, as it does with the following schema:

      <xs:element name="call">
      <xs:complexType>
      <xs:choice maxOccurs="unbounded">
      <xs:element name="string" type="xs:string"/>
      <xs:element name="int" type="xs:int"/>
      <xs:element name="boolean" type="xs:boolean"/>
      </xs:choice>
      </xs:complexType>
      </xs:element>

      Perhaps somewhat related to JAXME-61, but I think the correct behaviour would be to fail with an error message on the first schema above until support for groups with maxOccurs > 1 is working?

      Attachments

        1. JAXME63.patch
          10 kB
          Jochen Wiedmann

        Activity

          People

            jochen@apache.org Jochen Wiedmann
            fredriv Fredrik Vraalsen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment